package edu.chl.jadetalk.admin.util;
        
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ApplicationScoped;

/**
 *
 * @author jesper
 */
@ManagedBean
@ApplicationScoped
public class ServerInfoUtilityBean {
    
    private Date time;

    @PostConstruct
    private void initVars(){
        time = Calendar.getInstance(TimeZone.getTimeZone("GMT+2:00")).getTime();
    }
    /** Creates a new instance of ServerInfoUtilityBean */
    public ServerInfoUtilityBean() {
         
    }
    
    public Date getServerTime(){
        return Calendar.getInstance(TimeZone.getTimeZone("GMT+2:00")).getTime();
    }
    
    public Date getServerStartTime(){
        return (Date) time.clone();
    }
    
}
